﻿using DataAccessLibrary.DAL;
using entities;

namespace BusinessLogicLibrary
{
    public class AuthenticateModule
    {
        private readonly AuthenDAO _authenDAO = new AuthenDAO();

        public string RoleGet(string account, string password)
        {
            return _authenDAO.RoleGet(account, password);
        }

        public bool UserCheck(string account, string password, string position, string serviceName)
        {
            return _authenDAO.UserCheck(account, password, position, serviceName);
        }

        public bool ChangePassword(string account, string password, string newPassword)
        {
            return _authenDAO.ChangePassword(account, password, newPassword);
        }

        public Employee EmployeeGet(string employeeAccount, string employeePassword)
        {
            return _authenDAO.SelectEmployee(employeeAccount, employeePassword);
        }
    }
}